package itdep.common.domain;

import org.springframework.beans.support.SortDefinition;

import java.io.Serializable;
import java.util.List;

/**
 * @author Ivan Khalopik
 * @version $Revision: 4 $ $Date: 2010-06-10 13:13:16 +0000 (Thu, 10 Jun 2010) $
 */
public interface EntityDao<PK extends Serializable, E extends Entity<PK>> extends GenericEntityDao<PK, E> {

	int count(EntityFilter<PK> filter);

	List<E> find(EntityFilter<PK> filter, int start, int count, SortDefinition... sortDefinitions);

	E findUnique(EntityFilter<PK> filter);

	List<PK> findKeys(EntityFilter<PK> filter, int start, int count, SortDefinition... sortDefinitions);

}
